package com.daryl.mytest.action;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.daryl.mytest.service.LoginService;
import com.daryl.mytest.service.impl.LoginServiceImpl;
import com.daryl.mytest.vo.Account;
import com.daryl.struts.aciton.Action;
import com.daryl.struts.form.ActionForm;

public class LoginAction implements Action {

	@Override
	public String execute(HttpServletRequest request, ActionForm form,
			Map<String, String> actionForward) {
		Account account = (Account) form;
		LoginService loginService = new LoginServiceImpl();
		String url = loginService.isLogin(account);
		request.setAttribute("account", account);
		return actionForward.get(url);
	}

		
}
